package com.htfg.cardActivate.core;

/**
 * @Auther: 王晨缘
 * @Date: 2018/10/24 0024 13:42
 * @Description:响应码枚举，参考HTTP状态码的语义
 */
public enum ResultCode {
    SUCCESS(200,"成功"),
    REGISTER_FAIL(201,"注册失败"),
    REGISTER_FAIL_PHONE(202,"该手机号已经注册过"),
    SENDMSG_FAIL(300,"手机验证码发送失败"),
    USER_NOT_EXIST(203,"用户不存在"),
    ORDER_COUNT_MANEY(501,"未完成订单超过5个"),
    ORDER_NOT_EXIST(502,"订单不存在"),
    FAIL(400,"程序错误"),
    NO_PERMISSION(211,"权限不足"),
    SERVER_ERROR(10000,"服务器异常"),
    AUTH_ERROR(10001,"认证失败"),
    PARAMS_ERROR(10002,"参数错误"),
    JSON_PARSE_ERROR(10003,"Json解析错误"),
    ILLEAGAL_STRING(15001,"非法字符串"),
    UNKNOW_ERROR(16000,"未知错误");


    private int code;
    private String msg;

    ResultCode(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
